package com.nstar.uecenter.view.main.impl
{
	import com.nstar.uecenter.mxml.Footer;
	import com.nstar.uecenter.mxml.Header;
	import com.nstar.uecenter.mxml.UECenterMain;
	
	import mx.core.Application;
	import mx.events.FlexEvent;
	import mx.events.ItemClickEvent;

	public class UECenterAppClass extends Application
	{
		
		public var header:Header;
		public var uecMain:UECenterMain;
		public var footer:Footer;
		
		
		public function UECenterAppClass()
		{
			super();
			this.addEventListener(FlexEvent.CREATION_COMPLETE,init);
		}
		
		private function init(event:FlexEvent):void{
			header.addEventListener(ItemClickEvent.ITEM_CLICK,navigatorHandler);
		}
		
		private function navigatorHandler(event:ItemClickEvent):void{
			uecMain.vsUECenter.selectedIndex = event.index;
		}
		
	}
}